package com.varian.redis.annotation;

import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * @author ben
 * @since 2024/9/26
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface VarianCachePut {

    @AliasFor("cacheName")
    String value() default "";

    @AliasFor("value")
    String cacheName() default "";

    String key() default "";

    String condition() default "";

    String unless() default "";

    long timeout() default 10;

    TimeUnit unit() default TimeUnit.MINUTES;
}
